home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
listings
/
v_02_03
/
2n03023a
< prev
next >
Wrap
Text File
|
1991-01-09
|
416b
|
24 lines
const
ARRAY_MAX = 10;
type
array_of_integer = array [1 .. ARRAY_MAX] of integer;
{*
* Compare two arrays of integers, a and b. Return TRUE
* if for all i from 1 to n, a[i] = b[i]; return FALSE
* otherwise.
*}
function equal(var a, b : array_of_integer; n : word)
: boolean;
var
i : word;
begin
i := 1;
while (i <= n) and (a[i] = b[i]) do
i := i + 1;
equal := i > n;
end;